<template>
  <el-row
    :gutter="10"
    class="nav"
  >
    <el-row
      :gutter="10"
      class="nav_item"
      v-for="(item,index) in navItem"
      :key="index"
      :style="{background:item.background}"
    >
      <el-col
        :span="8"
        :class="item.icon"
        class="iconItem"
      ><i class="item.icon"></i></el-col>
      <el-col :span="8">
        <el-row>
          <el-col style="font-size:16px">{{item.title}}</el-col>
        </el-row>
        <el-row>
          <el-col>{{item.number}}</el-col>
        </el-row>
      </el-col>
    </el-row>

  </el-row>
</template>

<script>
export default {
  data() {
    return {
      navItem: [],
    };
  },
  mounted() {
    this.$bus.$on("getNavItem", (navItem) => {
      this.navItem = navItem;
    });
  },
};
</script>

<style>
* {
  padding: 0;
  margin: 0;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 160px;
}
.nav_item {
  background-color: #ccc;
  width: 20%;
  height: 160px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 20px;
}
.iconItem {
  width: 80px;
  border-radius: 50%;
  background-color: #fff;
  height: 80px;
  line-height: 80px;
  font-size: 30px;
}
.iconItem i {
  line-height: 80px;
}
</style>
